<?php

$modversion['name'] = _MI_TENKI_NAME;
$modversion['version'] = 0.04;
$modversion['description'] = _MI_TENKI_DESC;
$modversion['author'] = "http://www.riaf.org/";
$modversion['credits'] = "riaf";
$modversion['help'] = "";
$modversion['license'] = "";
$modversion['official'] = 0;
$modversion['image'] = "images/logo.gif";
$modversion['dirname'] = "tenki";

// Admin
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

// Menu
$modversion['hasMain'] = 1;

// Smarty
$modversion['use_smarty'] = 1;

// Templates
$modversion['templates'][1]['file'] = 'tenki_index.html';
$modversion['templates'][1]['description'] = '';
$modversion['templates'][2]['file'] = 'tenki_viewarea.html';
$modversion['templates'][2]['description'] = '';
$modversion['templates'][3]['file'] = 'tenki_viewlocal.html';
$modversion['templates'][3]['description'] = '';
$modversion['templates'][4]['file'] = 'tenki_index_myarea1.html';
$modversion['templates'][4]['description'] = '';
$modversion['templates'][5]['file'] = 'tenki_index_myarea2.html';
$modversion['templates'][5]['description'] = '';

// Blocks
$modversion['blocks'][1]['file'] = "tenki_blocks.php";
$modversion['blocks'][1]['name'] = _MI_TENKI_BNAME1;
$modversion['blocks'][1]['description'] = _MI_TENKI_BDESC1;
$modversion['blocks'][1]['show_func'] = "b_tenki_today";
$modversion['blocks'][1]['edit_func'] = "b_tenki_edit";
$modversion['blocks'][1]['template'] = "tenki_today.html";
$modversion['blocks'][1]['can_clone'] = true;
$modversion['blocks'][1]['options'] = "0|0|4410|0";

$modversion['blocks'][2]['file'] = "tenki_blocks.php";
$modversion['blocks'][2]['name'] = _MI_TENKI_BNAME2;
$modversion['blocks'][2]['description'] = _MI_TENKI_BDESC2;
$modversion['blocks'][2]['show_func'] = "b_tenki_tomorrow";
$modversion['blocks'][2]['edit_func'] = "b_tenki_edit";
$modversion['blocks'][2]['template'] = "tenki_tomorrow.html";
$modversion['blocks'][2]['can_clone'] = true;
$modversion['blocks'][2]['options'] = "0|0|4410|0";

$modversion['blocks'][3]['file'] = "tenki_blocks.php";
$modversion['blocks'][3]['name'] = _MI_TENKI_BNAME3;
$modversion['blocks'][3]['description'] = _MI_TENKI_BDESC3;
$modversion['blocks'][3]['show_func'] = "b_tenki_weekly";
$modversion['blocks'][3]['edit_func'] = "b_tenki_edit";
$modversion['blocks'][3]['template'] = "tenki_weekly.html";
$modversion['blocks'][3]['can_clone'] = true;
$modversion['blocks'][3]['options'] = "0|0|4410|0";

// Config
$modversion['config'][1] = array(
    'name' => 'use_cache',
    'title' => '_MI_USECACHE',
    'description' => '_MI_USECACHE_DESC',
    'formtype' => 'yesno',
    'valuetype' => 'int',
    'default' => 1
    );
$modversion['config'][] = array(
    'name' => 'cache_time',
    'title' => '_MI_CACHETIME',
    'description' => '_MI_CACHETIME_DESC',
    'formtype' => 'textbox',
    'valuetype' => 'int',
    'default' => 3600
    );
$modversion['config'][] = array(
    'name' => 'use_proxy',
    'title' => '_MI_USEPROXY',
    'description' => '_MI_USEPROXY_DESC',
    'formtype' => 'yesno',
    'valuetype' => 'int',
    'default' => 0
    );
$modversion['config'][] = array(
    'name' => 'proxy_host',
    'title' => '_MI_PROXYHOST',
    'description' => '_MI_PROXYHOST_DESC',
    'formtype' => 'textbox',
    'valuetype' => 'text',
    'default' => '127.0.0.1'
    );
$modversion['config'][] = array(
    'name' => 'proxy_port',
    'title' => '_MI_PROXYPORT',
    'description' => '_MI_PROXYPORT_DESC',
    'formtype' => 'textbox',
    'valuetype' => 'int',
    'default' => 8080
    );
//$modversion['config'][] = array(
//    'name' => 'proxy_user',
//    'title' => '_MI_PROXYUSER',
//    'description' => '_MI_PROXYUSER_DESC',
//    'formtype' => 'textbox',
//    'valuetype' => 'text',
//    'default' => ''
//    );
//$modversion['config'][] = array(
//    'name' => 'proxy_pass',
//    'title' => '_MI_PROXYPASS',
//    'description' => '_MI_PROXYPASS_DESC',
//    'formtype' => 'password',
//    'valuetype' => 'text',
//    'default' => ''
//    );
$modversion['config'][] = array(
    'name' => 'snoopy_timeout',
    'title' => '_MI_SNOOPY_TIMEOUT',
    'description' => '_MI_SNOOPY_TIMEOUT_DESC',
    'formtype' => 'textbox',
    'valuetype' => 'int',
    'default' => 0
    );

// On Update
if(!empty($_POST['fct']) && !empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname']) {
    include dirname( __FILE__ ) . "/include/onupdate.inc.php";
} 

?>